package com.wimcorp.magic.behaviour.attack;

import com.wimcorp.magic.behaviour.Behaviour;
import com.wimcorp.magic.cards.Creature;
import com.wimcorp.magic.combat.Target;
import com.wimcorp.magic.players.Player;

public abstract class AttackBehaviour extends Behaviour {

	enum AttackType{FIRST_STRIKE,LIFELINK,DEATHTOUCH,ASSASINATE_PLAYER,DEFAULTATTACK,TRAMPLE}
	
	private Creature creature;
	private AttackBehaviour attackBehaviour;

	protected AttackBehaviour() {
	}

	public AttackBehaviour(Creature creature, AttackBehaviour attackBehaviour) {
		this.creature = creature;
		this.attackBehaviour = attackBehaviour;
	}
	
	public void attack(Target target) {
		if (target instanceof Creature) {
			attack((Creature) target);
		} else if (target instanceof Player) {
			attack((Player) target);
		}
	}

	protected abstract void attack(Creature defender);
	
	public abstract void counter(Creature attacker);

	protected abstract void attack(Player defender);
	
	

	public abstract int priority();

	public Creature getCreature() {
		return creature;
	}

	public AttackBehaviour getAttackBehaviour() {
		return attackBehaviour;
	}

	

}
